1. Field of the Invention
The present invention relates to a method and a system for detecting hidden ghost keys on a keyboard matrix, in particular, to a method and a system for detecting hidden ghost keys from a plurality of keys of a matrix installed in a keyboard.
2. Description of Related Art
In order to avoid having excessive connected wires incurring higher manufacturing cost and inconvenient assembling process, manufacturers generally design a keyboard by a keyboard matrix. For keyboards designed with a keyboard matrix, the occurrence of ghost keys becomes an indispensible factor for the design of a conventional keyboard due to the physical properties of the keyboard matrix.
With reference to FIG. 1A, a keyboard matrix includes row scanning lines A, B and column scanning lines 1, 2 interlaced with the row scanning lines A, B respectively, and a method for detecting a pressed key of a keyboard sequentially scans the interlaced scanning lines A, B, 1, 2 in the keyboard, and determines whether or not a key w, x, y, or z is pressed at any of the interaction of the scanning lines, such that the scanning lines form a loop, wherein each pressed key is similar to a switch for connecting the row and the column scanning lines. If a key is pressed to electrically connect a scanning line (or turn on a switch) at an intersection, such that the interlaced row and column scanning lines form a loop, then the keyboard controller may determine which key is pressed and generates a corresponding key control signal according to the position of the formed loop.
In FIG. 1A, A-1 and A-2 form a loop after the electric potentials of the sequentially scanned A-1, A-2, B-1, and B-2 have changed, and thus the keyboard controller determines that keys w and y are pressed at positions A-1 and A-2, and generates key control signals corresponding to the keys w and y.
However, if three keys w, x, and y on the keyboard matrix as shown in FIG. 1B are pressed simultaneously, then A-1, A-2 and B-1 forming a loop; wherein although the key z at the intersection B-2 has not been connected to the scanning lines B and 2 directly, signals can still be transmitted through the path B-1-A-2 as indicated by the line Cir of the loop path in FIG. 1B. The fact that even though the key z is not pressed to connect the scanning line B-2, yet B-2 still forms a loop indirectly subsequently leads to a misjudgment that the key z has been pressed at the B-2 position. The key z in this example is referred to as a “ghost key”, which is a key not pressed on a keyboard but is still determined as having been pressed.
In other words, common row scanning lines or column scanning lines exist in the “#” shaped position of w, x, y, and z on the keyboard matrix, and thus not only the key z becomes a ghost key when the keys w, x, y are pressed simultaneously, but the remaining fourth key also becomes a ghost key when any three out of the four keys are pressed simultaneously.
To prevent a misjudgment of the input state of a key from the keyboard, manufacturers find the position where a ghost key may occur on the keyboard matrix, and then eliminate or change the key position when a key is installed to a key position of the keyboard, so as to assure that no ghost key occurs during a key input of the keyboard.
In other words, common row scanning lines or column scanning lines exist in the “#” shaped position of w, x, y, and z on the keyboard matrix. In an exemplary example, the key z becomes a ghost key when the keys w, x, y are pressed simultaneously. In general, a fourth key becomes a ghost key when the other three of the four keys are pressed simultaneously.